#ifndef IMAGEVIEWER_H
#define IMAGEVIEWER_H

#include <QMainWindow>
#include <QPrinter>

class QAction;
class QLabel;
class QMenu;
class QScrollArea;
class QScrollBar;
class QImage;
class OpenDialog;
class ImageViewer : public QMainWindow
{

    Q_OBJECT

    public:
        ImageViewer();

    private slots:
        void open();
        void zoomIn();
        void zoomOut();
        void normalSize();
        void fitToWindow();
        void about();
        void group();
        void displayWatermarkedImg(QImage *img);

    private:
        void createActions();
        void createMenus();
        void updateActions();
        void scaleImage(double factor);
        void adjustScrollBar(QScrollBar *scrollBar, double factor);

        QLabel *imageLabel;
        QScrollArea *scrollArea;
        double scaleFactor;

        QAction *watermarkAct;
        QAction *exitAct;
        QAction *zoomInAct;
        QAction *zoomOutAct;
        QAction *normalSizeAct;
        QAction *fitToWindowAct;
        QAction *aboutAct;
        QAction *groupAct;

        QMenu *fileMenu;
        QMenu *viewMenu;
        QMenu *helpMenu;

        OpenDialog *openDialog;
};

#endif // IMAGEVIEWER_H
